//
//  GroupForCoachCell.m
//  YunDongAdmin
//
//  Created by lqq on 2018/9/12.
//  Copyright © 2018年 cloudfighting.com. All rights reserved.
//

#import "GroupForCoachCell.h"

@interface GroupForCoachCell ()
@property (weak, nonatomic) IBOutlet UIImageView *avaterImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;

@end

@implementation GroupForCoachCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _avaterImageView.layer.cornerRadius = 2;
    _avaterImageView.layer.masksToBounds = YES;
    [self.contentView addBottomLineViewWithLeftSpace:0 rightSpace:0];

}

- (void)setCoach:(M_Coach *)coach
{
    _coach = coach;
    [_avaterImageView setAvaterImageWithUrl:coach.avatarUrl];
    _nameLabel.text = coach.coachName;
    _descLabel.text = [NSString stringWithFormat:@"职位：%@  |  会员数：%d人",coach.coachTitle,coach.memberCount];
}




- (IBAction)callPhone:(id)sender {
    if (_coach.coachMobile.length > 0) {
        NSMutableString *str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",_coach.coachMobile];
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
    } else {
        [AV showRemind:@"该教练暂未绑定手机"];
    }
}

@end
